import request from '@/utils/request'

const api_name='/admin/system/sysUser'

export default{

    // 更改用户状态
    updateStatus(id,status){
        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/updateStatus/${id}/${status}`,
            method: 'get',
          })
    },

    getPageList(page,limit,searchObj){
        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/${page}/${limit}`,
            method: 'get',
            params: searchObj
          })
    },
    // 添加
    save(sysUser){
        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/save`,
            method: 'post',
            data: sysUser
          })

    },
    // 删除
    delete(id){

        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/romove/${id}`,
            method: 'delete',
          
          })

    },
    // 修改
    update(sysUser){

        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/update`,
            method: 'put',
            data: sysUser
          })

    },
// 查询
    getById(id){

        return request({
            // url: '/admin/system/sysRole/'+page+'/'+limit,
            url: `${api_name}/get/${id}`,
            method: 'get',
            
          })
    }
  

    }